<li class="item">
<?php 
	$level_w = array(
		'1'=> '',
		'2'=> 'w_20',
		'3'=> 'w_40',
	);
	$label = array(
			'1'=> '添加二级分类',
			'2'=> '添加三级分类',
			'3'=> '添加四级分类',
	);
?>
	<ul class="c_f p_5 cate">
		<li class="w_240 f_l t_l">
			<div class="<?php echo $level_w[$data->zca_level]; ?> f_l">&nbsp;</div>

			<span class="mem_ico fold<?php if($data->zca_level==3){echo ' ico_del';}else{echo ' ico_fold';}?>"></span>
			<span>&nbsp;
				<?php echo CHtml::textfield('Category[zca_title][]',$data->zca_title,array('class'=>'cate_title s_ipt','catid'=>$data->zca_id)); ?>
			</span>	
		</li>
		<li class="w_180 f_l t_c">
			<?php if($data->zca_level==1){?>
			<div class="c_img c_img50">
				&nbsp;<?php if(!empty($data->attachment)) echo Tool::thumb($data->attachment->zat_url,30,30)?>
			</div>
			<?php }else{?>
				<?php if($data->zca_level>1&&empty($data->zmd_id)) echo CHtml::link(t('Binding model','adm'),'javascript:',array('class'=>'c_06c bind_att_mod_button','zca_id'=>$data->zca_id))?>
				<?php if(isset($data->attmod)) echo '<label class="c_999 bind_att_mod_button" zca_id='.$data->zca_id.'>'.$data->attmod->zmd_title."</label>" ?>
			<?php }?>
		</li>
		<li class="w_140 f_l t_c c">&nbsp;
			<div class="<?php echo $level_w[$data->zca_level]; ?> f_l">&nbsp;</div>
			<a class="mem_ico uplist ord_7" title="向上移动" href="javascript:">&nbsp;</a>
			<?php echo CHtml::hiddenfield('Category[zca_id][]', CHtml::encode($data->zca_id)); ?>
			<a class="mem_ico downlist ord_8" title="向下移动" href="javascript:">&nbsp;</a>
		</li>
		<li class="w_140 f_l t_c">&nbsp;
			<?php echo CHtml::link('宝贝列表', array($this->pre_module_url.'/product/admin', 'Product[cateid3]'=>$data->zca_id),array('class'=>'c_666')); ?>
		</li>
		<li class="w_120 f_l t_c">&nbsp;
			<?php echo CHtml::link('删除', array('delete', 'id'=>$data->zca_id),array('class'=>'del_date c_06c')); ?>
			<?php echo CHtml::link('编辑', array('updateSeo', 'id'=>$data->zca_id),array('class'=>' c_06c')); ?>
		</li>
	</ul>
	<?php if($data->zca_level<3){?>
	<div class = "child d_n">
		<?php  $this->widget('zii.widgets.CListView', array(
			'dataProvider'=>Category::model()->loadChild($data->zca_id),
			'itemView'=>'_view',
			'emptyText'=>"",
			'enablePagination'=>'false',
			'template'=>'{items}',
			'itemsCssClass'=>'',
			'summaryText'=>'',
			'itemsTagName'=>'ul',
			'htmlOptions'=>array('class'=>'type_list c_f')
		)); ?>
		<?php if($data->zca_level<3){?>
		<div class="cate_addbtn">
			<div class="w_20 f_l">&nbsp;</div>
			<div class="<?php echo $level_w[$data->zca_level]; ?> f_l">&nbsp;</div>
			
			<span class="mem_bgx link_btn mr5">
			 	<a class="mem_bgx link_btn add_cate_btn click" href="javascript:" catid="<?php echo $data->zca_id?>" level="<?php echo $data->zca_level?>" title=""><?php echo $label[$data->zca_level]; ?></a>
			 	<b class="mem_bgx left"></b><b class="mem_bgx right"></b>
			 </span>
		 </div>
		 <?php } ?>
	 </div>
	 <?php }?>
</li>